<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        User::factory(10)->create();
        //可以自定义生成的数据个别属性
        $user = User::find(1);
        $user->name = 'ovopack的粉丝';
        $user->email = '706334793@qq.com';
        $user->avatar = '/images/avatar/default.png';
        $user->save();
    }
}
